<?php

/*用户基本操作*/
Route::get('index','Common\PublicController@index');//主页

/*需求管理*/
Route::group(['prefix'=>'demand','namespace'=>'Demand'],function(){
	Route::group(['prefix'=>'create'],function(){
		Route::get('index','CreateController@index');//创建需求页面
		Route::post('create','CreateController@create');//
		Route::post('tier','CreateController@tier');//层级菜单（根据集团搜索获取所有后代）
		Route::get('regexp_search','CreateController@regexp_search');//
	});
	Route::group(['prefix'=>'mine'],function(){
		Route::get('index','MineController@index');//我的需求页面
		Route::post('create','MineController@create');//
	});
	Route::group(['prefix'=>'all'],function(){
		Route::get('index','AllController@index');//所有需求页面
		Route::post('create','AllController@create');//
	});
	Route::group(['prefix'=>'distribution'],function(){
		Route::get('index','DistributionController@index');//分配需求页面
		Route::post('create','DistributionController@create');//
	});
	Route::group(['prefix'=>'review'],function(){
		Route::get('index','ReviewController@index');//审核需求页面
		Route::post('create','ReviewController@create');//
	});
	Route::group(['prefix'=>'delete'],function(){
		Route::get('index','DeleteController@index');//删除需求页面
		Route::post('create','DeleteController@create');//
	});
});

/*结算管理*/
Route::group(['prefix'=>'settlement','namespace'=>'Settlement'],function(){
	Route::group(['prefix'=>'audit'],function(){
		Route::get('index','AuditController@index');//待经理审核页面
	});
	Route::group(['prefix'=>'referring'],function(){
		Route::get('index','ReferringController@index');//未结算列表页面
	});
	Route::group(['prefix'=>'settling'],function(){
		Route::get('index','SettlingController@index');//已提交结算页面
	});
	Route::group(['prefix'=>'settled'],function(){
		Route::get('index','SettledController@index');//已结算列表页面
	});
	Route::group(['prefix'=>'dissettle'],function(){
		Route::get('index','DissettleController@index');//无需结算列表页面
	});
});

/*提成管理*/
Route::group(['prefix'=>'salary','namespace'=>'Salary'],function(){
	Route::group(['prefix'=>'staff'],function(){
		Route::get('index','StaffController@index');//员工提成页面
		Route::post('create','StaffController@create');//
	});
	Route::group(['prefix'=>'dept'],function(){
		Route::get('index','DeptController@index');//部门提成页面
		Route::post('create','DeptController@create');//
	});
});

/*系统管理*/
Route::group(['prefix'=>'system','namespace'=>'System'],function(){
	Route::group(['prefix'=>'demander'],function(){
		Route::get('index','DemanderController@index');//发包单位管理页面
		Route::post('ajax_select','DemanderController@ajax_select');
		Route::post('create','DemanderController@create');//发包单位组织架构添加和修改功能
		Route::get('getTree_list','System\DemanderController@getTree_list');//获取org列表
		Route::post('destroy','DemanderController@destroy');//启用或者停用需求方org
		Route::post('edit','DemanderController@edit');//修改
	});
	Route::group(['prefix'=>'companyInfo'],function(){
		Route::get('index','CompanyInfoController@index');//公司信息管理页面
		Route::post('create','CompanyInfoController@create');//
		Route::post('create','CompanyInfoController@create');//添加公司  部门  组 接口
		Route::match(['post','get'],'select_List','CompanyInfoController@select_List');//返回  部门 select 
		Route::get('restore_disable','CompanyInfoController@restore_disable');// 恢复-停用  接口
		Route::get('edit','CompanyInfoController@edit');// 修改按钮--  接口
	});
	Route::group(['prefix'=>'cContract'],function(){
		Route::get('index','CContractController@index');//(company简写c)公司合同管理页面
		Route::post('create','CContractController@create');//添加合同及其从属类型
		Route::post('destroy','CContractController@destroy');//合同/合同类型的启用/禁用
		Route::post('sort','CContractController@sort');//合同类型排序功能
		Route::post('edit','CContractController@edit');//修改合同请求
		Route::post('edit_form','CContractController@edit_form');//修改合同提交
		Route::post('copy','CContractController@copy');//复制合同
	});
	Route::group(['prefix'=>'sContract'],function(){
		Route::get('index','SContractController@index');//(supplier简写s)需求方合同管理页面
		Route::post('create','SContractController@create');//添加供应商合同
		Route::post('edit','SContractController@edit');//修改供应商合同请求
		Route::post('edit_form','SContractController@edit_form');//修改供应商合同提交
		Route::post('destroy','SContractController@destroy');//供应商合同/合同类型的启用/禁用
	});
	Route::group(['prefix'=>'operation'],function(){
		Route::get('index','OperationController@index');//运营管理页面
		Route::post('create','OperationController@create');//
	});
	Route::group(['prefix'=>'staff'],function(){
		Route::get('index','StaffController@index');//员工管理页面
		Route::post('create','StaffController@create');//添加|修改-接口
		Route::post('select_List','StaffController@select_List');//添加|修改 select -接口
		Route::post('select_query','StaffController@select_query');//搜索select -接口
		Route::post('show_list','StaffController@show_list');//分页 -接口
		Route::post('edit','StaffController@edit');//编辑按钮 -接口
		Route::post('restore_disable','StaffController@restore_disable');//删除|恢复 -接口
		Route::post('reset_password','StaffController@reset_password');//重置密码 -接口
        Route::post('See_details','StaffController@See_details');//查看员工详
	});
	Route::group(['prefix'=>'supplier'],function(){
		Route::get('index','SupplierController@index');//供应商管理页面
		Route::post('create','SupplierController@create');//创建/修改供应商
		Route::post('destroy','SupplierController@destroy');//启用/停用供应商
	});
});

/*通讯录*/
Route::group(['prefix'=>'contact','namespace'=>'Contact'],function(){
	Route::group(['prefix'=>'company'],function(){
		Route::get('index','CompanyController@index');//全速网络通讯录页面
		Route::post('create','CompanyController@create');//
	});
	Route::group(['prefix'=>'BP'],function(){
		Route::get('index','BPController@index');//业务方通讯录页面
		Route::post('create','BPController@create');//
	});
});

/*其他*/
Route::group(['prefix'=>'others','namespace'=>'Others'],function(){

});

/*页头导航:个人信息，修改密码，通讯录等*/
Route::group(['prefix'=>'personal','namespace'=>'Personal'],function(){
	Route::group(['prefix'=>'info'],function(){
		Route::get('index','InfoController@index');
	});
	Route::group(['prefix'=>'password'],function(){
		Route::get('index','PasswordController@index');
	});
	Route::group(['prefix'=>'contact'],function(){
		Route::get('index','ContactController@index');
	});
});

/*test*/
Route::get('test','Demand\CreateController@test');





